# -*- coding: utf-8 -*-
'''
    :file: re_test.py
    :author: -Farmer
    :url: https://blog.farmer233.top
    :date: 2021/02/13 21:24:00
'''
import re

# rule = '[A-Za-z][A-Za-z0-9_]*'

# string = "Farmer"
# status = re.findall(rule, string)
# print(status, type(status), len(string))
# if status[0] == string:
#     print("Match.")
# else:
#     print("Not Match.")

email = 'farmer@farmer233.yz'
rule = "[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?"
match = re.match(rule, email)
if match:
    print(match)
else:
    print('None')